<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-html</title>
</head>
<body>
    <div id="app">
        <input type="button" value="v-on指令事件" v-on:click="doit">
        <input type="button" value="v-on指令事件" @click="doit">  <!-- 两个方式都可以 @是快捷键 -->
        <input type="button" value="v-on指令事件" @dblclick="doit">
        <h2 @click="changeCook">{{ message }}</h2>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <script>
        var app = new Vue({
            el:'#app',
            data:{
                message:'西兰花真不错'
            },
            methods:{
                doit:function(){
                    alert('你是傻逼');
                },
                changeCook:function(){
                    this.message += "好好吃！ "
                }
            },
        })
    </script>
</body>
</html>